home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 August
/
Ahoy_Magazine_87-08_1987_Double_L_Side_A.d64
/
Short Sort 2
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
417b
|
13 lines
0 print"[147]":poke53280,12:poke53281,12:poke646,0
1 rem ==================================
2 rem commodares problem #40-2 :
3 rem short sort
4 rem solution by
5 rem walter deuchler jr.
6 rem ==================================
10 mx=99 : dim a(mx) :rem max. integer
20 nm=10 :rem # terms
30 for j=1 to nm : x = int(rnd(0)*100) : a(x)=a(x)+1 : next
40 for j=0 to mx : t=a(j) :if t then for k=1 to t : print j; : next k
50 next j